﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyBlog.ServiceInterface;
using MyBlog.Model;
using MyBlog.Common;
using MyBlog.BusinessInterface;

namespace MyBlog.Service
{
    public class ConcernService : IConcernService
    {
        IBusinessConcern _business;

        public ConcernService(IBusinessConcern business)
        {
            _business = business;
        }

        public void Add(ConcernModel entity)
        {
            _business.Add(entity);
        }

        public void AddRange(IEnumerable<ConcernModel> entities)
        {
            _business.AddRange(entities);
        }

        public void Update(ConcernModel entity)
        {
            _business.Update(entity);
        }

        public void Delete(params object[] primaryKey)
        {
            _business.Delete(primaryKey);
        }

        public void Delete(ConcernModel model)
        {
            _business.Delete(model);
        }

        public void DeleteRange(IEnumerable<ConcernModel> entities)
        {
            _business.DeleteRange(entities);
        }

        public ConcernModel Get(params object[] primaryKey)
        {
            return _business.Get(primaryKey);
        }

        public ConcernModel Get(ConcernModel model)
        {
            return _business.Get(model);
        }

        public List<ConcernModel> GetAll(bool isTracking = true)
        {
            return _business.GetAll(isTracking);
        }

        public List<ConcernModel> GetAll(ConcernModel model, bool isTracking = true)
        {
            return _business.GetAll(model, isTracking);
        }


        public List<ConcernModel> GetAll(ConcernModel model, int page, int size, out int total, bool isTracking = true)
        {
            throw new NotImplementedException();
        }
    }
}
